<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <?php include_http_metas() ?>
    <?php include_metas() ?>
    <?php include_title() ?>
    <link rel="shortcut icon" href="/favicon.ico" />
    <?php include_stylesheets() ?>
    <?php include_javascripts() ?>
  </head>
  
  
  <body>
		
		<div class="topbar">
			<table class="topbar_table">
				<colgroup style="width:260px"></colgroup>
				<colgroup style="width:160px"></colgroup>
				<colgroup style="width:80px"></colgroup>				
				<colgroup style="width:80px"></colgroup>
				<colgroup style="width:120px"></colgroup>
				<colgroup style="width:110px"></colgroup>
				<colgroup style="width:90px"></colgroup>
				<colgroup style="width:100px"></colgroup>
				<colgroup style="width:*"></colgroup>
				<tr class="topbar_tr">
					<td rowspan="2" class="topbar_td2">
					<a class="topbar_link" href="about.jsp"><?php echo link_to(image_tag('project_logo.png',array('style'=>'border:none;margin-left:5px')),'@about') ?></a></td>
					<td class="topbar_td" style="text-align:right;padding-right:10px;" colspan="8">
					<?php if($sf_user->isAuthenticated()) echo link_to('Moje konto - '.$sf_user->getUsername(),'@user_profile',array('class'=>"topbar_link"))." / "?><?php echo ($sf_user->isAuthenticated()?link_to('Wyloguj','@sf_guard_signout',array('class'=>"topbar_link")):link_to('Zaloguj','@sf_guard_signin',array('class'=>"topbar_link"))) ?></td>
				</tr>
				<tr class="topbar_tr">
					<td class="topbar_td"><?php echo link_to('<div class="topbar_tab">Strona główna</div>','@homepage',array('class'=>"topbar_link")) ?></td>
					<td class="topbar_td"><?php echo link_to('<div class="topbar_tab">Gra</div>','@user_game',array('class'=>"topbar_link")) ?></td>
					<td class="topbar_td"><?php echo link_to('<div class="topbar_tab">Pomoc</div>','@help',array('class'=>"topbar_link")) ?></td>
					<?php if($sf_user->isMod()){ ?>
						<td class="topbar_td"><?php echo link_to('<div class="topbar_tab">Zasady gry</div>','@mod_rules',array('class'=>"topbar_link")) ?></td>
						<td class="topbar_td"><?php echo link_to('<div class="topbar_tab">Turnieje</div>','@mod_tournament',array('class'=>"topbar_link")) ?></td>
						<td></td>
						<td></td>
					
					<?php }else if($sf_user->isAdmin()){ ?>
						<td class="topbar_td"><?php echo link_to('<div class="topbar_tab">Zasady gry</div>','@mod_rules',array('class'=>"topbar_link")) ?></td>
						<td class="topbar_td"><?php echo link_to('<div class="topbar_tab">Turnieje</div>','@mod_tournament',array('class'=>"topbar_link")) ?></td>
						<td class="topbar_td"><?php echo link_to('<div class="topbar_tab">Gracze</div>','@players',array('class'=>"topbar_link")) ?></td>
                                                <td></td>
					<?php }else{ ?>
					<td></td>
					<td></td>
					<td></td>	
					<td></td>
					<?php } ?>
					<td></td>
				</tr>
			</table>
		</div>
				
	<div class="content">
		<?php if ($sf_user->hasFlash('notice')): ?>
			<div class="flash_notice"><?php echo $sf_user->getFlash('notice') ?></div>
		<?php endif ?>
		<?php if ($sf_user->hasFlash('error')): ?>
			<div class="flash_error"><?php echo $sf_user->getFlash('error') ?></div>
		<?php endif ?>
		<?php echo $sf_content ?>
	</div>
  </body>
</html>